Skip to content

Adds support for attr_* method references #3706

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

tommycrumrine
Copy link

@tommycrumrine tommycrumrine commented Aug 7, 2025

Motivation

Shows references for methods defined with attr_reader, attr_writer, attr_accessor

Re-opening stale PR #2848. Sorry this fell off my radar!

Closes #2668

Implementation

attr_reader, attr_writer, attr_accessor are just methods, so on call node if we detect one of these methods, and one of the arguments match the target method name, add the reference.

Additionally, I have ensured it works with empty and string arguments as well as added tests for these cases.

Automated Tests

Yes!

Manual Tests

Screenshot 2024-11-15 at 1 43 07 PM

Copy link

graphite-app bot commented Aug 7, 2025

How to use the Graphite Merge Queue

Add the label graphite-merge to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@tommycrumrine tommycrumrine marked this pull request as ready for review August 7, 2025 01:48
@tommycrumrine tommycrumrine requested a review from a team as a code owner August 7, 2025 01:48
@tommycrumrine tommycrumrine changed the title Add attr method references Adds support for attr_* method references Aug 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support attr_* for References
1 participant